@echo off
setlocal

rem This script is only tested under Windows XP.

rem See "call /?" or "for /?" for detailed help on ~fdpnxsatz syntax.
rem
set EBBS_ROOT=%~dp0
set ERL_LIBS=%EBBS_ROOT%lib

rem The dtl_server:lookup/1 usage in %EBBS_ROOT%htdocs/ and
rem conf/ebbs.config require this.
rem
echo Change to directory %EBBS_ROOT%
cd /D %EBBS_ROOT%

rem See "set /?" for detailed help on :str1=str2 syntax.
rem A tip:
rem for /F "usebackq" %I in (`echo hello`) do set var=%I
rem
echo Running werl...
start werl -boot start_sasl -config %EBBS_ROOT%conf\ebbs ^
    -mnesia dir '"%EBBS_ROOT:\=/%database"' ^
    -s ebbs start

